<?php foreach ($events as $event) { 
?>
<div class="item">
	<div class="photo">
	<!--  <img alt="" src="images/img3.jpg" /> -->
		<?php if($event['image']):?>
			<?php  echo link_to('<img src="/uploads/events/thumbnail_169_127/'.$event['image'].'"/>','event_view',$event); ?>
		<?php else:?>
			<?php  echo link_to(image_tag('noimage.png'),'event_view',$event); ?>
		<?php endif;?>
	</div>
	<div class="description">
		<h2><?php echo $event['title'];?></h2>				
		<em class="branch"><strong>Организатор:</strong> <?php echo ($event['branch_id']!=NULL? link_to($event['Branch']['title'],'branch/index?cbranch='.$event['Branch']['id']) : 'отсутствует');?> </em>
		<em class="date"><?php echo format_date(strtotime($event['updated_at']),'D','ru');?></em>
		<p><?php 
		//var_dump($event['Branch']);
		echo $event['short'] ?></p>
		<div class="more">
			<?php echo link_to('Подробнее','event_view',$event); ?>
		</div>
	</div>
</div>
<?php } ?>
<div class='allarchive'><?php echo link_to('Все события','event/index');?></div>